package com.houtai.dao;

import com.houtai.bean.TdActivity;
import com.houtai.bean.dto.activity.PageActivity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TdActivityDao {
    /**
     * @Purpose   查找活动列表
     * @param     page
     * @version   1.0
     * @author    李准
     * @time      2017-08-19
     * @return    List<TdActivity>
     */
    List<TdActivity> findTdActivityList(PageActivity page);

    /**
     * @Purpose   查找活动详情
     * @param     activity_id
     * @version   1.0
     * @author    李准
     * @time      2017-08-19
     * @return    TdActivityDetail
     */
    TdActivity findTdActivityDetail(@Param("activity_id")int activity_id);
    /**
     * @Purpose   添加活动
     * @param     tdActivity
     * @version   1.0
     * @author    李准
     * @time      2017-08-19
     * @return    void
     */
    void insertTdActivity(TdActivity tdActivity);
    /**
     * @Purpose   更新活动
     * @param     tdActivity
     * @version   1.0
     * @author    李准
     * @time      2017-08-19
     * @return    void
     */
    void updateTdActivity(TdActivity tdActivity);
    /**
     * @Purpose   更新活动是否可用
     * @param     activity_id
     * @version   1.0
     * @author    李准
     * @time      2017-08-19
     * @return    void
     */
    void updateTdActivityState(@Param("activity_id")int activity_id,
                               @Param("state") int state);
}
